package com.example.demo.day0301;

import java.io.BufferedWriter;
import java.io.FileWriter;


public class DemoBufferedWriter {
    public static void main(String[] args) {
        try {
            DemoBufferedWriter.textBufferedWriter();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    public static void textBufferedWriter() throws Exception {
        FileWriter fw = new FileWriter("D:\\demo\\src\\main\\java\\com\\example\\demo\\day0301\\tt3.txt");
        //字符输出流

        BufferedWriter bwr = new BufferedWriter(fw);//缓冲字符输出流

        String s = "hello world";

        bwr.write(s);

        bwr.close();
        fw.close();
    }
}
